home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / mem / mmualloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-12  |  497 b   |  37 lines

  1.  
  2. #include "tek/mem.h"
  3. #include "tek/kn/exec.h"
  4. #include "tek/debug.h"
  5.  
  6. /* 
  7. **    TEKlib
  8. **    (C) 2001 TEK neoscientists
  9. **    all rights reserved.
  10. **
  11. **    TAPTR TMMUAlloc(TAPTR mmu, TUINT size)
  12. **
  13. **    alloc from MMU.
  14. **
  15. */
  16.  
  17. TAPTR TMMUAlloc(TAPTR mmu, TUINT size)
  18. {
  19.     if (!size)
  20.     {
  21.         tdbprintf(10, "TMMUAlloc: allocating size = 0\n");
  22.     }
  23.  
  24.     /*if (size)*/
  25.     {
  26.         if (mmu)
  27.         {
  28.             return (*((TMMU *) mmu)->allocfunc)(((TMMU *) mmu)->allocator, size);
  29.         }
  30.         else
  31.         {
  32.             return kn_alloc(size);
  33.         }
  34.     }
  35.     return TNULL;
  36. }
  37.